<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>et</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Charisma, a fully featured, responsive, HTML5, Bootstrap admin template.">
    <meta name="author" content="Muhammad Usman">
<%@include file="/commons/commonJs.jsp"%>

<script type="text/javascript">

function showUser(data,divId){
	$("#"+divId).modal();
	$("#userName").val(data.userName);
	$("#sex").val(data.sex);
	$("#age").val(data.age);
	$("#mobile").val(data.mobile);
	$("#address").val(data.address);
	$("#onlineStartDate").val(data.onlineStartDate);
	$("#onlineEndDate").val(data.onlineEndDate);
	$("#offlineStartDate").val(data.offlineStartDate);
	$("#offlineEndDate").val(data.offlineEndDate);
	$("#schoolName").val(data.schoolName);
	$("#majorName").val(data.majorName);
	$("#studentLevel").val("level "+data.studentLevel);
	$("#chineseName").val(data.chineseName);
	$("#englishName").val(data.englishName);
	$("#createTime").val(data.createTime);
	$("#updateTime").val(data.updateTime);
	$("#createUser").val(data.createUser);
	$("#updateUser").val(data.updateUser);
}


</script>
</head>

<body>

            <!-- content starts -->
                <div>
        <ul class="breadcrumb">
            <li>
                <a href="#">主页</a>
            </li>
            <li>
	            <c:if test="${user.userType=='xy' }"><a href="#">学员管理</a></c:if>
		        <c:if test="${user.userType=='xz' }"><a href="#">校长管理</a></c:if>
		        <c:if test="${user.userType=='jw' }"><a href="#">教务管理</a></c:if>
		        <c:if test="${user.userType=='js' }"><a href="#">教师管理</a></c:if>
                
            </li>
        </ul>
    </div>


<form id="splitPage"  action="${pageContext.request.contextPath }/mgt/user/userList.do" method="POST">
<c:if test="${user.userType=='xy' }">
<div class="row">
        <div class="box col-md-12">
            <div class="box-inner">
                <div class="box-header well" data-original-title="">
                    <h2>学员查询</h2>

                    <div class="box-icon">
                        <a href="#" class="btn btn-setting btn-round btn-default"><i
                                class="glyphicon glyphicon-cog"></i></a>
                        <a href="#" class="btn btn-minimize btn-round btn-default"><i
                                class="glyphicon glyphicon-chevron-up"></i></a>
                        <a href="#" class="btn btn-close btn-round btn-default"><i
                                class="glyphicon glyphicon-remove"></i></a>
                    </div>
                </div>
                <div class="box-content">
                    <fieldset>
                    <div class="form-group col-md-4">
	                    <label class="control-label" for="userName">学员名称</label>
	                    <input type="text" class="form-control" name="userName" value="${user.userName }" id="userName">
	                </div>
					<div class="form-group col-md-4">
	                    <label class="control-label" for="chineseName">中文姓名</label>
	                    <input type="text" class="form-control" name="chineseName" value="${user.chineseName }" id="chineseName">
	                </div>
	                <div class="form-group col-md-4">
	                    <label class="control-label" for="englishName">英文姓名</label>
	                    <input type="text" class="form-control" name="englishName" value="${user.englishName }" id="englishName">
	                </div>  	
					
					
				  	<div class="form-group">
						<button type="button" class="btn btn-primary" onclick='queryList("content", "splitPage");'>查询</button>
						<button type="reset" class="btn">重置</button>
				  	</div>
				</fieldset>
                    
                </div>
            </div>
        </div>
    </div><!--/span-->
</c:if>


    <div class="row">
    <div class="box col-md-12">
    <div class="box-inner">
    <div class="box-header well" data-original-title="">
        <h2><i class="glyphicon glyphicon-user"></i> <c:if test="${user.userType=='xy' }"><th>学员列表</th></c:if>
        <c:if test="${user.userType=='xz' }"><th>校长列表</th></c:if>
        <c:if test="${user.userType=='jw' }"><th>教务列表</th></c:if>
        <c:if test="${user.userType=='js' }"><th>教师列表</th></c:if></h2>
		<a class="btn btn-round btn-primary" href="javascript:skipPage('<%=basePath%>mgt/user/toUserSave.do?userType=${user.userType }')" style="font-size:10px;float:right">
        		<i class="glyphicon glyphicon-edit icon-white"></i>新增</a>
        <!-- <div class="box-icon">
            <a href="#" class="btn btn-setting btn-round btn-default"><i class="glyphicon glyphicon-cog"></i></a>
            <a href="#" class="btn btn-minimize btn-round btn-default"><i
                    class="glyphicon glyphicon-chevron-up"></i></a>
            <a href="#" class="btn btn-close btn-round btn-default"><i class="glyphicon glyphicon-remove"></i></a>
        </div> -->
    </div>
    <div class="box-content">
    <table class="table table-bordered table-striped table-condensed">
    <thead>
    <tr>
        <th onclick="orderbyFun('th_id','content', 'splitPage', 'id')">id<span id="th_id"></span></th>
        <c:if test="${user.userType=='xy' }"><th>学员用户名</th></c:if>
        <c:if test="${user.userType=='xz' }"><th>校长用户名</th></c:if>
        <c:if test="${user.userType=='jw' }"><th>教务用户名</th></c:if>
        <c:if test="${user.userType=='js' }"><th>教师用户名</th></c:if>
        <th>中文姓名</th>
        <th>英文姓名</th>
        <c:if test="${user.userType=='xz' }"><th>所属校区</th></c:if>
        <c:if test="${user.userType=='xy' }"><th>学员级别</th></c:if>
        <c:if test="${user.userType!='xy' }"><th>电话号码</th></c:if>
        <th>手机号码</th>
        <th>修改人</th>
        <th>修改时间</th>
        <th>Actions</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${pager.list }" var="item">  
	<c:if test="${!empty item }">
    	<tr>
        <td>${item.id }</td>
        <td class="center">${item.userName }</td>
        <td class="center">${item.chineseName }</td>
        <td class="center">${item.englishName }</td>
        <c:if test="${user.userType=='xz' }"><th>${item.schoolIdName }</th></c:if>
        <c:if test="${user.userType=='xy' }"><td class="center">
            <span class="label-success label label-default">level ${item.studentLevel }</span>
        </td></c:if>
        <c:if test="${user.userType!='xy' }"><td class="center">${item.telNo }</td></c:if>
        
        <td class="center">${item.mobile }</td>
        <td class="center">${item.updateUser }</td>
        <td class="center"><fmt:formatDate value="${item.updateTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
        <td class="center">
            <a class="btn btn-success" href="javascript:ajaxDiv(false, 'userShow', '<%=basePath%>mgt/user/toUserShow.do', '{id:${item.id }}', showUser)" style="font-size:10px">
                <i class="glyphicon glyphicon-zoom-in icon-white"></i>
                View
            </a>
            <c:if test="${user.userType=='xy' }">
            	<a class="btn btn-success" href="javascript:skipPage('<%=basePath%>mgt/classTable/orderClassList.do', '{studentId:${item.id }}')" style="font-size:10px">
	                <i class="glyphicon glyphicon-zoom-in icon-white"></i>
	                订课记录
	            </a>
            </c:if>
            <a class="btn btn-info" href="javascript:skipPage('<%=basePath%>mgt/user/toUserUpdate.do','{id:${item.id }}')" style="font-size:10px">
                <i class="glyphicon glyphicon-edit icon-white"></i>
                Edit
            </a>
            <a class="btn btn-danger" href="javascript:skipPage('<%=basePath%>mgt/user/userDelete.do','{id:${item.id },userType:\'${user.userType }\'}')" style="font-size:10px">
                <i class="glyphicon glyphicon-trash icon-white"></i>
                Delete
            </a>
        </td>
    	</tr>
    </c:if>
    </c:forEach>
    </tbody>
    </table>
    
    <div id="splitPageDiv" ></div>
	<%@include file="/commons/splitPage.jsp"%>
    
    </div>
    </div>
    </div>
    <!--/span-->

    </div><!--/row-->

</form>
















	<div class="modal fade" id="userShow" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
         aria-hidden="true">

        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">×</button>
                    <c:if test="${user.userType=='xy' }"><h3>学员信息</h3></c:if>
			        <c:if test="${user.userType=='xz' }"><h3>校长信息</h3></c:if>
			        <c:if test="${user.userType=='jw' }"><h3>教务信息</h3></c:if>
			        <c:if test="${user.userType=='js' }"><h3>教师信息</h3></c:if>
                </div>
                <div class="modal-body">
                	<fieldset>
                    	<div class="form-group col-md-6">
	                    <label class="control-label" for="userName">用户名</label><span id="sp_userName" ></span>
	                    <input type="text" class="form-control" name="userName"  id="userName">
	                </div>
	                
	                <c:if test="${user.userType=='xy' }">
	                <div class="form-group col-md-6">
	                    <label class="control-label" for="studentLevel">学员级别</label><span id="sp_studentLevel" ></span>
	                    <input type="text" class="form-control" name="studentLevel"  id="studentLevel">
	                </div>
	                </c:if>
	                <c:if test="${user.userType=='xz' }">
	                <div class="form-group col-md-6">
	                    <label class="control-label" for="schoolName">所属校区</label><span id="sp_studentLevel" ></span>
	                    <input type="text" class="form-control" name="schoolName"  id="schoolName">
	                </div>
	                </c:if>
	                
	                <div class="form-group col-md-6">
	                    <label class="control-label" for="chineseName">中文姓名</label><span id="sp_chineseName" ></span>
	                    <input type="text" class="form-control" name="chineseName" id="chineseName">
	                </div>
	                <div class="form-group col-md-6">
	                    <label class="control-label" for="englishName">英文姓名</label><span id="sp_englishName" ></span>
	                    <input type="text" class="form-control" name="englishName"  id="englishName">
	                </div>
	                <div class="form-group col-md-6">
	                    <label class="control-label" for="sex">性别</label><span id="sp_sex" ></span>
	                    <input type="text" class="form-control" name="sex"  id="sex">
	                </div>
	                <div class="form-group col-md-6">
	                    <label class="control-label" for="age">年龄</label><span id="sp_age" ></span>
	                    <input type="text" class="form-control" name="age" id="age">
	                </div>
	                <c:if test="${user.userType=='xy' }">
	                <div class="form-group col-md-6">
	                    <label class="control-label" for="offlineStartDate">线下课程开始时间</label><span id="sp_offlineStartDate" ></span>
	                    <input type="text" class="form-control" name="offlineStartDate"  id="offlineStartDate" >
	                </div>
	                <div class="form-group col-md-6">
	                    <label class="control-label" for="offlineEndDate">线下课程结束时间</label><span id="sp_offlineEndDate" ></span>
	                    <input type="text" class="form-control"  name="offlineEndDate"  id="offlineEndDate" >
	                </div>
	                <div class="form-group col-md-6">
	                    <label class="control-label" for="onlineStartDate">线上课程开始时间</label><span id="sp_onlineStartDate" ></span>
	                    <input type="text" class="form-control"  name="onlineStartDate"  id="onlineStartDate" >
	                </div>
	                <div class="form-group col-md-6">
	                    <label class="control-label" for="onlineEndDate">线上课程结束时间</label><span id="sp_onlineEndDate" ></span>
	                    <input type="text" class="form-control"  name="onlineEndDate"  id="onlineEndDate" >
	                </div>
	                <div class="form-group col-md-6">
	                    <label class="control-label" for="schoolName">所在学校</label><span id="sp_schoolName" ></span>
	                    <input type="text" class="form-control" name="schoolName"  id="schoolName">
	                </div>
	                <div class="form-group col-md-6">
	                    <label class="control-label" for="majorName">所学专业</label><span id="sp_majorName" ></span>
	                    <input type="text" class="form-control" name="majorName" id="majorName">
	                </div>
	                </c:if>
	                
	                
	                
	                <div class="form-group col-md-6">
	                    <label class="control-label" for="telNo">手机号码</label><span id="sp_telNo" ></span>
	                    <input type="text" class="form-control" name="telNo"  id="telNo">
	                </div>
	                <div class="form-group col-md-6">
	                    <label class="control-label" for="mobile">手机号码</label><span id="sp_mobile" ></span>
	                    <input type="text" class="form-control" name="mobile"  id="mobile">
	                </div>
	                <div class="form-group col-md-6">
	                    <label class="control-label" for="address">联系地址</label><span id="sp_address" ></span>
	                    <input type="text" class="form-control" name="address"  id="address">
	                </div>
	                <div class="form-group col-md-6">
                    <label class="control-label" for="passWord">创建人</label>
	                    <input type="text" class="form-control" name="createUser" value="" id="createUser">
	                </div>
	                <div class="form-group col-md-6">
	                    <label class="control-label" for="passWord">创建时间</label>
	                    <input type="text" class="form-control" name="createTime" value="" id="createTime">
	                </div>
	                <div class="form-group col-md-6">
	                    <label class="control-label" for="schoolName">修改人</label>
	                    <input type="text" class="form-control" name="updateUser" value="" id="updateUser">
	                </div>
	                <div class="form-group col-md-6">
	                    <label class="control-label" for="passWord">修改时间</label>
	                    <input type="text" class="form-control" name="updateTime" value="" id="updateTime">
	                </div>
					</fieldset>  
                </div>
                <div class="modal-footer">
                    <a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>
                    <!-- <a href="#" class="btn btn-primary" data-dismiss="modal">Save changes</a> -->
                </div>
            </div>
        </div>
    </div>
    
    
    
    
    
    
    
    <!-- content ends -->


</body>
</html>
